-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MBL-1816] PLOT Ineligible state #2220
Conversation
…jluna/MBL-1816/plot-ineligible-state # Conflicts: # Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift # Library/ViewModels/NoShippingPledgeViewModel.swift # Library/ViewModels/PledgePaymentPlansViewModel.swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Had just a few suggestions that should be pretty easy to get in before we merge this
Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift
Outdated
Show resolved
Hide resolved
@@ -174,6 +205,7 @@ final class PledgePaymentPlanOptionView: UIView { | |||
self.titleLabel.rac.text = self.viewModel.outputs.titleText | |||
|
|||
self.subtitleLabel.rac.text = self.viewModel.outputs.subtitleText | |||
self.subtitleLabel.isHidden = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably go in applySubtitleLabelStyle
with the other styles.
Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift
Outdated
Show resolved
Hide resolved
…jluna/MBL-1816/plot-ineligible-state # Conflicts: # Library/ViewModels/NoShippingPledgeViewModel.swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like the minimum was already been changed to $125! Let's see if we can get that in the API and make it dynamic. I brought up this issue in #ppo-mobile-squad
.
In the meantime, can you add the threshold amount of $125 to your view model object, instead of hardcoding it in several places and in the string? Let's treat it like it is coming from the API, and then it will be an easy fix when the API is updated.
@@ -76,6 +84,8 @@ final class PledgePaymentPlanOptionView: UIView { | |||
), | |||
for: .normal | |||
) | |||
|
|||
self.ineligibleBadgeLabel.text = "Available for pledges over $150" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two thoughts:
- The $150 minimum - or even better, the whole badge text! - should come from the API. It seems likely to change.
- This needs a
//todo
comment for translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raising this in #ppo-mobile-squad
@@ -130,6 +140,30 @@ final class PledgePaymentPlanOptionView: UIView { | |||
]) | |||
|
|||
self.termsOfUseButton.setContentHuggingPriority(.required, for: .horizontal) | |||
|
|||
self.ineligibleBadgeView.addSubview(self.ineligibleBadgeLabel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be slightly cleaner/more brief if the ineligibleBadgeView
was its own UIView subclass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the follow up/clean up ticket https://kickstarter.atlassian.net/browse/MBL-1940
project: project, | ||
rewards: [reward], | ||
selectedShippingRule: .template, | ||
selectedQuantities: [reward.id: 150], // To pass the threshold validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this threshold only need to be 15 since each reward is $10. The screenshot below is for a reward of $1,500 which is a little confusing.
# Conflicts: # Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewController.swift # Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewControllerTest.swift # Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift # Library/ViewModels/NoShippingPledgeViewModel.swift # Library/ViewModels/PledgePaymentPlansOptionViewModel.swift # Library/ViewModels/PledgePaymentPlansOptionViewModelTest.swift # Library/ViewModels/PledgePaymentPlansViewModel.swift # Library/ViewModels/PledgePaymentPlansViewModelTest.swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good!
📲 What
This PR implements the "PLOT ineligible" state for the Payment Plan Selector. It disables the "Pledge Over Time" option when the total pledge amount is below the threshold of $150.00 and displays a note indicating the ineligibility, with the amount converted using the project’s currency.
🤔 Why
The "PLOT is NOT eligible" state ensures backers understand why the "Pledge Over Time" option is unavailable. This limitation is based on the total pledge amount being below the required threshold of $150.00. By providing clear feedback, users are informed of the eligibility requirements.
🛠 How
Adding the new field
ineligible
toPledgePaymentPlanOptionData
andPledgePaymentPlansAndSelectionData
👀 See
✅ Acceptance criteria
⏰ TODO